package com.huisenky.smallidea.convert.model;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Objects;

// 起到缓存的作用
@Data
@AllArgsConstructor
public class InjectCacheKey {
    private Class<?> injector;
    private Object value;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        InjectCacheKey that = (InjectCacheKey) o;
        return injector.equals(that.injector) &&
                value.equals(that.value);
    }

    @Override
    public int hashCode() {
        return Objects.hash(injector, value);
    }
}
